package org.jsystemtest.tests_proj;

public class MyListener implements EventI{
	
	
	@Override
	public void receiveEvent(String str) {
		System.out.println("Received event "+str);
	}
	
	public static void main(String[] args) {
		MyListener l1 = new MyListener();
		MyListener l2 = new MyListener();
		MyListener l3 = new MyListener();
		
		MyObject object = new MyObject();
		object.addLister(l1);
		object.addLister(l2);
		object.addLister(l3);
		
		object.somethingInterestingHappend("First event");
		object.removeLister(l1);
		object.removeLister(l2);
		
		object.somethingInterestingHappend("Second event");
		object.somethingInterestingHappend("Third event");
		
	}

}
